package com.wxproj.wxai.config;

import com.baomidou.mybatisplus.extension.api.R;
import io.jsonwebtoken.SignatureException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class PermissionHandler {
        @ExceptionHandler(value = { SignatureException.class })
        @ResponseBody
        public R<?> authorizationException(SignatureException e){
            return R.failed("401用户未登录");
        }
    }

